package suites.integration {
	import org.flexunit.asserts.assertEquals;
	import org.flexunit.asserts.assertFalse;
	import org.flexunit.asserts.assertTrue;
	import org.splink.library.queue.QEvent;
	import org.splink.library.utils.ArrayUtils;
	import org.splink.resource.ResourceProvider;

	/**
	 * @author Max Kugland
	 */
	public class EmptyTest extends AbstractIntegrationTest {
		
		[Test (async)]
		public function testEmpty() : void {
			handleAsync(100);
			var xml : XML = <resourcebundles defaultLocale="de_DE">
								<resourcebundle locale="de_DE" />
							</resourcebundles>;
			
			createProcessor(xml, function(e : QEvent) : void {
				assertEquals(ResourceProvider.instance().defaultLocale, "de_DE");				assertTrue(ArrayUtils.contains(ResourceProvider.instance().availableLocales, "de_DE"));				assertEquals(1, ResourceProvider.instance().availableLocales.length);				assertFalse(ArrayUtils.contains(ResourceProvider.instance().availableLocales, "en_EN"));
			}).start();
		}
	}
}
